package com.website.web.front.controller;

import com.website.common.core.controller.BaseController;
import com.website.custom.domain.WConfig;
import com.website.custom.domain.WServices;
import com.website.custom.service.IWConfigService;
import com.website.custom.service.IWServicesService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.GetMapping;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.List;

@Controller
public class ContactController extends BaseController {

    @Autowired
    private IWConfigService iwConfigService;
    @Autowired
    private IWServicesService iwServicesService;
    @Autowired
    private IWConfigService wConfigService;

    @GetMapping("/contact")
    public String about(HttpServletRequest request, HttpServletResponse response, ModelMap model) {
        WConfig wConfig = iwConfigService.selectWConfigById(1L);
        model.put("wConfig",wConfig);
        // 服务项目
        List<WServices> wServices = iwServicesService.selectWServicesList(null);
        model.put("serviceList",wServices);
        return "front/contact";
    }
}
